<include file="Index:head" />
<link href="/assets/css/article_at.css" type="text/css" rel="stylesheet">
<if condition="$article.audiopath != ''">
  <script src="__JS__/jquery-1.5rc1.js"></script>
  <link rel="stylesheet" href="__CSS__/style.css">
</if>
<style type="text/css">
  body{background-color: #fff; max-width: 640px; margin: 0px auto;}
  .foot{border-top:solid 1px #e7e7e7; margin-top:12px;}
</style>
<script type="text/javascript">
$(function(){
	$(".articlevideo iframe").removeAttr("width");	
	$(".articlevideo iframe").removeAttr("height");
	$(".articlevideo iframe").removeAttr("style");
	$(".articlevideo iframe").css({"width":"100%","height":"240px"});
    $(".article_content img").each(function(index, element){
      $(this).removeAttr("width").css({"width":"100%"});
      $(this).removeAttr("height").css({"height":"auto"});
    })
    $(".article_content *").each(function(index, element){
       $(this).css({"margin-bottom":"0px"});
       if($(this).html() == '<br>'){
         $(this).remove();
       }
    })
})
</script>

<section class="wrap">
  <!--新增-->
  <div class="articles" style="margin-top:0px;">
    <div class="article_title">
      <h3>{$article.title}</h3>
      <em>{$article.pubdate}</em>
    </div>
    <div class="articlevideo">{:W('Data/getvideo',array('str'=>$article['videopath']))}</div>
    <div class="article_content">
      <if condition="$article.audiopath != ''"><audio controls src="{$article.audiopath}"></audio><script src="__JS__/jquery.iwish.js"></script></if>
      {$article.content}
    </div>
    <!--相关文档-->
    <assign name="getid" value="$Think.get.id"/>
    <notempty name="other_article">
      <div class="correlation_title">相关内容</div>
      <div class="correlation_list">
        <volist name="other_article" id="cor">
          <if condition="$cor['id'] neq $getid">
            <a href="{:U('Article/index', array('id' => $cor['id']))}">· {$cor['title']}</a>
          </if>
        </volist>
      </div>
    </notempty>
  </div>
</section>
<!--评论-->
<!-- 
<script type="text/javascript">var type = 1;</script>
<include file="Conmment:index" />
 -->
<script type="text/javascript">
  wx.config({
    debug: false,
    appId: '{$signPackage.appId}',
    timestamp: '{$signPackage.timestamp}',
    nonceStr: '{$signPackage.nonceStr}',
    signature: '{$signPackage.signature}',
    jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage']
  });
  wx.ready(function () {
    // 1 判断当前版本是否支持指定 JS 接口，支持批量判断
    wx.checkJsApi({
      jsApiList: [
        'getNetworkType',
        'previewImage',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareQQ',
        'onMenuShareWeibo'
      ],
      success: function (res) {
        //alert(JSON.stringify(res));
      }
    });
    var shareData = {
              title: '{$article.title}',
              desc: '{$article.description}',
              link: '',
    imgUrl: '{:C('WEBDOMAIN')}{$article.thumbimg}',
            trigger: function (res) {
      //alert('用户点击发送给朋友');
    },
    success: function (res) {
      //alert('已分享');
    },
    cancel: function (res) {
      //alert('已取消');
    },
    fail: function (res) {
      //alert(JSON.stringify(res));
    }
  };
    wx.onMenuShareAppMessage(shareData);
    wx.onMenuShareTimeline(shareData);
    wx.onMenuShareQQ(shareData);
    wx.onMenuShareWeibo(shareData);
  });
  wx.error(function (res) {
    //alert(res.errMsg);
  });
</script>
<!--wrap over--> 
<include file="Index:footer" />
